//
//  CourseModel.swift
//  约健
//
//  Created by tyh on 2017/9/26.
//  Copyright © 2017年 tyh. All rights reserved.
//

/*
 "id":"2",
 "train_name":"蜜桃臀计划",
 "thumb":"training/thumb/20160124/20160124073516_1319110232.JPG",
 "thumbsize":"67K",
 "introduction":"<p>蜜桃臀计划</p>",
 "train_type":"1",
 "scene_id":"1",
 "scene_name":"健身房",
 "body_name":"臀",
 "degree":"2",
 "userid":"1",
 "hits":"59",
 "insert_time":null,
 "update_time":"2016-01-24 07:35:16",
 "check_userid":"1",
 "checktime":null,
 "checkstate":"1",
 "listorder":"1",
 "vstate":"1"
 */

import UIKit

class CourseModel: NSObject {
    
    var id:NSString!
    var train_name:NSString!
    var thumb:NSString!
    var thumbsize:NSString!
    var introduction:NSString!
    var train_type:NSString!
    var scene_id:NSString!
    var scene_name:NSString!
    var body_name:NSString!
    var degree:NSString!
    var userid:NSString!
    var hits:NSString!
    var insert_time:NSNull!
    var update_time:NSString!
    var check_userid:NSString!
    var checktime:NSNull!
    var checkstate:NSString!
    var listorder:NSString!
    var vstate:NSString!
    
    
    class func CourseModelWithDict(_ dict:NSDictionary)-> CourseModel{
        let model = CourseModel()
        
        model.setValuesForKeys(dict as! [String: NSObject])
        
        /*
         model.id = dict.value(forKey: "id") as! NSString!
         model.train_name = dict.value(forKey: "train_name") as! NSString!
         model.thumb = dict.value(forKey: "thumb") as! NSString!
         model.thumbsize = dict.value(forKey: "thumbsize") as! NSString!
         model.introduction = dict.value(forKey: "introduction") as! NSString!
         model.scene_id = dict.value(forKey: "scene_id") as! NSString!
         model.scene_name = dict.value(forKey: "scene_name") as! NSString!
         model.hits = dict.value(forKey: "hits") as! NSString!
         model.body_name = dict.value(forKey: "body_name") as! NSString!
         model.degree = dict.value(forKey: "degree") as! NSString!
         model.userid = dict.value(forKey: "userid") as! NSString!
         model.insert_time = dict.value(forKey: "insert_time") as! NSNull!
         model.update_time = dict.value(forKey: "update_time") as! NSString!
         model.check_userid = dict.value(forKey: "check_userid") as! NSString!
         model.checktime = dict.value(forKey: "checktime") as! NSNull!
         model.checkstate = dict.value(forKey: "checkstate") as! NSString!
         model.listorder = dict.value(forKey: "listorder") as! NSString!
         model.vstate = dict.value(forKey: "vstate") as! NSString!
         model.train_type = dict.value(forKey: "train_type") as! NSString!
       */
        
        return model
    }

    

}
